#ifndef GAME_STATE_H
#define GAME_STATE_H

#include "B_GameStateHandler.h"
#include "../Framework_Defines.h"

class B_GameState
{
protected:

//irrlicht-specific
    irr::IrrlichtDevice       *m_device; //irrlicht device pointer
    irr::video::IVideoDriver  *m_driver; //irrlicht video driver pointer
    irr::gui::IGUIEnvironment *m_env;    //irrlicht GUI environment ptr
    irr::scene::ISceneManager *m_smgr;      //irrlicht scene manager ptr
//end irr-spec
    
    B_GameStateHandler    *m_handler;

public:
	// class constructor
    B_GameState(B_GameStateHandler* handler);
	// class destructor
	virtual ~B_GameState() {};

	// render state
	virtual void Update() = 0; //called every game loop (will call Render if neccesary)
	virtual void Render() = 0; //draws things, but should NOT call beginScene/endScene, let Update do that

	virtual void Pause() {}
	virtual void Resume() {}


	virtual bool onEvent(irr::SEvent event) = 0;  //irrlicht-specific parameter

		
protected:
	
//irrlicht-specific
	// draws a colored rectangle (function for easy 2D graphics testing)
	inline void DrawRect(irr::video::SColor color, irr::core::rect<irr::s32> screenPos);
//end irr-spec
};



#endif
